﻿// -----------------------------------------------------------------------
// <copyright file="Constants.cs" company="Diddly Squad">
// </copyright>
// -----------------------------------------------------------------------

using Microsoft.Xna.Framework;
using FarseerPhysics.Dynamics;

namespace DiddlySquat
{
	/// <summary>
	/// Keeping constant values in one place
	/// </summary>
	public static class Constants
	{
		public const float MeterInPixels = 64f;

		public const int DefaultScreenWidth = 1000;
		public const int DefaultScreenHeight = 600;

		public static readonly Vector2 DefaultGravity = new Vector2(0, 20);

		public const int MaxProjectiles = 10;
		public const int DefaultSoundLevel = 2;
		public const int DefaultMusicLevel = 5;

		#region SystemConstants
		public const string LevelsFolder = "levels";
		public const string QuickSave = "quicksave.sav";
		public const string SavedStatus = "Game saved succesfully";
		public const string LoadedStatus = "Game loaded succesfully";

		public static readonly Color StatusSuccessfullColor = Color.Green;
		#endregion

		#region MenuConstants
		public const string MenuNew = "New";
		public const string MenuHelp = "Help";
		public const string MenuLoad = "Load";
		public const string MenuSave = "Save";
		public const string MenuOptions = "Options";
		public const string MenuCredits = "Credits";
		public const string MenuQuit = "Quit";
		public const string MenuContinue = "Continue";
		public const string NewSave = "New save game";

		public static readonly Color SelectedMenuItemColor = Color.Red;
		public static readonly Color MenuItemColor = Color.White;
		#endregion

		#region MenuOptionsConstants
		public const string MenuOptionMusic = "Music Level";
		public const string MenuOptionSound = "Sound Level";
		public const string MenuOptionBack = "Back";
		public const int MaxSound = 10;
		public const int MinSound = 0;
		public const int MaxMusic = 10;
		public const int MinMusic = 0;
		#endregion

		#region CameraConstants
		public const float PlayerOnCameraHeightRatio = 7f / 10;
		public const float PlayerOnCameraWidthRatio = 1f / 2;
		#endregion

		#region AnimationConstants
		public const int AnimationFrameWidth = 98;
        public const int AnimationFrameHeight = 98;
		public const int AnimationFrameCount = 10;
		public const int AnimationFrameTime = 10;
        public const int ExitAnimationFrameHeight = 490;
		#endregion

		#region CharacterConstants
		public const float DefaultCharacterSize = 96f / (2f * MeterInPixels);
		public const int DefaultCharacterMaxJumps = 1;
		public const float DefaultCharacterJumpStrength = 10f;
		#endregion

		#region PlayersConstants
		public const double PlayerStartingHealth = 100;
		public const string PlayerSprite = "circleSprite";
        public const string PlayerDeathSprite = "playerdeathanimation4";
        public const string PlayerExitSprite = "exitAnimation1";
        public const int PlayerRadius = 98 / 2;
		public const float PlayerSizeFactor = 1f;
		public const float PlayerRestitution = 0.3f;
		public const float PlayerFriction = 0.5f;
		public const float PlayerJumpStrength = 15f;
		public const float PlayerMoveStrength = 20f;
		public const int PlayerMaxJumps = 2;   
		#endregion

		#region EnemyConstants
		public const double DefaultEnemyHealth = 10;
		public const string EnemySprite = "enemySprite";
		public const string EnemyDeathSprite = "deathAnimation";
		public const float EnemySizeFactor = 0.5f;
		public const float EnemyRestitution = 0.3f;
		public const float EnemyFriction = 0.5f;
		public const float DefaultEnemySpeed = 5f;
		public const float DefaultEnemyMaxSpeed = 5f;
		public const float DefaultEnemyRange = 5f;
		#endregion

		#region BigBoyConstants
		public const string BigBoySprite = "bigBoySprite";
		public const float BigBoySizeFactor = 2.0f;
		public const float BigBoyRestitution = 0.3f;
		public const float BigBoyFriction = 0.5f;
		public const double BigBoyDamage = 5;
		public const float BigBoySpeed = 5f;
		public const float BigBoyMaxSpeed = 5f;
		public const float BigBoyRange = 5f;
		#endregion

		#region SmallIdiotConstants
			public const string SmallIdiotSprite = "smallIdiotSprite";
		public const float SmallIdiotSizeFactor = 0.5f;
		public const float SmallIdiotRestitution = 0.3f;
		public const float SmallIdiotFriction = 0.5f;
		public const double SmallIdiotDamage = 2;
		public const float SmallIdiotSpeed = 3f;
		public const float SmallIdiotMaxSpeed = 10f;
		public const float SmallIdiotRange = 5f;
		public const float SmallIdiotJumpStrength = 5f;
		public const int SmallIdiotMaxJumps = 1;
		#endregion

		#region OldieConstants
		public const string OldieSprite = "enemySprite";
		public const float OldieSizeFactor = 0.5f;
		public const float OldieRestitution = 0.3f;
		public const float OldieFriction = 0.5f;
		public const double OldieDamage = 3;
		public const float OldieSpeed = 3f;
		public const float OldieMaxSpeed = 3f;
		public const float OldieRange = 5f;
		#endregion

		#region FlyerConstants
		public const string FlyerSprite = "flyerSprite";
		public const float FlyerSizeFactor = 1f;
		public const float FlyerRestitution = 0.3f;
		public const float FlyerFriction = 0.5f;
		public const double FlyerDamage = 3;
		public const bool FlyerIsFlying = true;
		public const float FlyerSpeed = 3f;
		public const float FlyerMaxSpeed = 5f;
		public const float FlyerRange = 8f;
		#endregion

		#region BasicGunConstants
		public const float BasicGunBulletSpeed = 10f;
		public const string BasicGunSprite = "weapon1";
		public const float BasicGunWidth = 96f / (2f * MeterInPixels);

		#endregion

		#region BasicProjectileConstants
		 public const float BasicProjectileSize = 10f / (2f * MeterInPixels);
		public const string BasicProjectileSprite = "bullet";
		public const float BulletMinSpeedToDamage = 20f;
		public const double BasicProjectileDamage = 1;
		#endregion

		#region Collisions
		public const Category PlayerCollisionCategory = Category.Cat1;
		public const Category EnemyCollisionCategory = Category.Cat5;
		public const Category ProjectileCollisionCategory = Category.Cat2;
		public const Category ObstacleCollisionCategory = Category.Cat4;
		public const Category WeaponCollisionCategory = Category.Cat3;
		public const Category CollectableCollisionCategory = Category.Cat6;

		public const Category PlayerCollidesWith = Category.All;
		public const Category EnemyCollidesWith = Category.All;
		public const Category ProjectileCollidesWith = ~Category.Cat1 & ~Category.Cat3;
		public const Category ObstacleCollidesWith = Category.All;
		public const Category WeaponCollidesWith = ~Category.Cat1;
		public const Category StartCollidesWith = Category.None;
		public const Category CollectableCollidesWith = PlayerCollisionCategory;

		#endregion

		#region Obstacles
		public const string ObstacleSprite = "ground";
		public const string ObstacleSprite2 = "ground2";
		public const string ObstacleSprite3 = "groundSprite";
		public const string ObstacleSprite4 = "ground4";
		public const string ObstacleSprite5 = "ground5"; //lava
		public const string ObstacleSprite6 = "collectableSprite";
		public const string ExitSprite = "exitSprite";
		public const string StartSprite = "startSprite";
		public const float ObstacleRotationMultiplier = 0.785498163f;
	   
		#endregion

		#region Counters
		public const string HealthFont = "fonts/healthcounterfont";
		public static readonly Vector2 HealthPosition = new Vector2(790, 30);
		public static readonly Vector2 PointsPosition = new Vector2(790, 50);
		public static readonly Vector2 TimerPosition = new Vector2(790, 70);


		#endregion

	}
}
